<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>查看每日地图</title>
    <script src="__PUBLIC__/jquery/jquery.min.js"></script>
    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css"  media="all">
    <link rel="stylesheet" href="__PUBLIC__/font-awesome/css/font-awesome.min.css" media="all" />
    <link rel="stylesheet" href="__CSS__/admin.css"  media="all">
    <script src="{$Think.config.httpFlag}{$Think.config.google_map_url}" async="async"></script>
    <script src="/googlemap/googleDirectionsService.js"></script>
</head>
<style>
    html,body,#map{width:100%;height:100%}
</style>
<body>
<!--客户信息的弹窗的内容数据-->
<div id="map">
{if empty($hasLine)}<div style="padding:8px;text-align: center;line-height: 100px;"><h2>请添加两个及以上的POI再进行查看</h2></div>{/if}
</div>
</body>
<script src="__PUBLIC__/layui/layui.js"></script>
<script src="__PUBLIC__/jquery/jquery.min.js"></script>
<script>
    layui.config({
        base : '__PUBLIC__/'
    }).extend({
        selectM: './multiple/selectM',
    }).use(['layer','form','jquery','selectM','laydate','table'],function() {
        var layer = layui.layer,
            $ = layui.jquery,
            form = layui.form,
            selectM = layui.selectM,
            laydate = layui.laydate,
            table = layui.table;
        laydate.render({     //创建时间选择框
            elem: '#start_go_time' //指定元素
            , format: 'yyyy-MM-dd'
        });
    })
</script>
<script>
    {notempty name="$hasLine"}
    var start_poi = {lat:{$map['start_poi']['lat']},lng:{$map['start_poi']['lng']}};
    var end_poi = {lat:{$map['end_poi']['lat']},lng:{$map['end_poi']['lng']}};
    var ways_poi = [];
    {notempty name="$map['middle_poi']"}
    {volist name="$map['middle_poi']" id="vo"}
    {if !empty($vo['lat']) && !empty($vo['lng'])}
        ways_poi.push({location:{lat:{$vo.lat},lng:{$vo.lng}}});
    {/if}
    {/volist}
    {/notempty}
        initMap("map",start_poi,end_poi,ways_poi);
    {/notempty}
</script>
</html>